package com.hjy.controller;

import com.hjy.common.result.Result;
import com.hjy.common.result.Type;
import com.hjy.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TypeController {
    @Autowired
    private TypeService typeService;

    /**
     * 商品分类
     */
    @GetMapping("/typeList")
    public Result<List<Type>> typeList() {
        List<Type> list = typeService.typeList();
        return Result.success(list);
    }
}
